package com.qdxwx.data.mapper.picture;

import com.qdxwx.common.page.PageRequest;
import com.qdxwx.models.picture.Picture;
import com.qdxwx.models.picture.PictureQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
@Repository
public interface PictureMapper {

    int insertPicture(Picture picture);

    Picture selectById(int id);

    List<Picture> selectList(@Param("e") PictureQuery picture, @Param("page") PageRequest page);

    int count(@Param("e") PictureQuery picture);

    int updatePicture(Picture picture);

    int deleteById(int id);

    int updateView(int id);

    int updateDown(int id);

    List<Picture> selectListByAlbum(@Param("e") PictureQuery picture, @Param("page") PageRequest page);

    int countByAlbum(@Param("e") PictureQuery picture);
}
